package com.jybd.live.dao.impl;

import com.jybd.live.dao.CameraDao;
import com.jybd.live.mapper.CameraMapper;
import com.jybd.live.model.Camera;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CameraDaoImpl implements CameraDao {

    private CameraMapper cameraMapper;

    @Autowired
    public CameraDaoImpl(CameraMapper cameraMapper) {
        this.cameraMapper = cameraMapper;
    }

    /**
     * 获取所有摄像头
     * demo测试用
     * @return
     */
    @Override
    public List<Camera> getAll(){
        List<Camera> list = cameraMapper.selectAll();
        return list;
    }
}
